using System;
using System.Collections.Generic;
using System.Text;
using System.Collections;

namespace Easily
{
    ///==============================================================================
    /// <summary>
    /// 功能说明：定义本工程中的唯一类型数据和使用到的枚举类型
    /// </summary>
    ///==============================================================================
    class Globaldefine
    {
        public static MDIParentFrame FrmParent = null;  //父窗体
        public static string exePath; //当前可执行文件位置,例如："F:\Easily\"，程序启动后自动获得
        public static LoadConfig loadConfig;   //加载配置文件信息

        public static float DotSize = 0.9F;     //控件连接点大小 20160317   0.7F [2021/4/13]hsc-图标放大 更改为0.9f
        public static int   IconInfoSize = 37;  //单个图标控件信息的个数

        public static int label_X=108;//显示图标控件注释信息的位置
        public static int label_Y =101;//显示图标控件注释信息的位置
        public static string labelstring = "this is label!";//图标控件注释信息
        public static bool labelvisible = false;//图标控件注释信息是否可见
       // public static bool labelvisible = true ;//图标控件注释信息是否可见
        public static ArrayList CopyGeneralArr2 = new ArrayList();//临时存放复制、剪切的通用控件20160607


        public static string KimiAPIKey = ""; //Kimi云API密钥
    }

    #region 全局类型定义，包括主、子程序类型；选择的控件的类型；数据类型等
    /// <summary>当前的程序类型</summary>
    public enum ProgrammerDocumentType
    {
        /// <summary>主程序</summary>
        MainFun,
        /// <summary>子程序</summary>
        SubFun,
        /// <summary>无</summary>
        NULL,
    }

    /// <summary>子程序类型</summary>
    public enum SubFunctionType
    {
        /// <summary>普通子程序</summary>
        GeneralSubFunction,
        /// <summary>中断子程序</summary>
        IntSubFunction,
        /// <summary>无</summary>
        NULL,
    }

    /// <summary>当前从树形控件视图中选择的控件的类型</summary>  
    public enum selectedType
    {
        /// <summary>事件控件类型</summary> 
        ExventIcon,
        /// <summary>执行控件类型</summary> 
        ExecuteIcon,
        /// <summary>传感器控件类型</summary>
        SensorIcon,
        /// <summary>流程控制控件类型</summary>
        FlowControl,
        /// <summary>子程序控件类型</summary>
        SubFunIcon,
        /// <summary>无</summary>
        NULL,
    }

    /// <summary>条件判断end控件连入点类型</summary>  
    public enum CdnjudgeEndInLinkType
    {
        /// <summary>真入口点</summary> 
        TrueInDot,
        /// <summary>假入口点</summary>
        FalseInDot,
        /// <summary>无</summary>
        NULL,
    }

    /// <summary>条件判断if控件连出点类型</summary>  
    public enum CdnjudgeOutLinkType
    {
        /// <summary>真出口点</summary> 
        TrueOutDot,
        /// <summary>假出口点</summary>
        FalseOutDot,
        /// <summary>无</summary>
        NULL,
    }

    /// <summary>条件循环控件连出点类型</summary>  
    public enum LoopOutLinkType
    {
        /// <summary>控件连出点</summary> 
        OutDot,
        /// <summary>控件循环连出点</summary>
        LoopOutDot,
        /// <summary>无</summary>
        NULL,
    }

    /// <summary>条件循环控件连入点类型</summary>  
    public enum LoopInLinkType
    {
        /// <summary>控件连入点</summary> 
        CdnInDot,
        /// <summary>控件循环连入点</summary>
        CdnLoopInDot,
        /// <summary>无</summary>
        NULL,
    }

    /// <summary>Switch控件连入点类型</summary>  
    public enum SwitchInDotType
    {
        /// <summary>分支1连入点</summary> 
        Case1InDot,
        /// <summary>分支1连入点</summary>
        Case2InDot,
        /// <summary>分支3连入点</summary>
        Case3InDot,
        /// <summary>无</summary>
        NULL,
    }

    /// <summary>Switch控件连出点类型</summary>  
    public enum SwitchOutDotType
    {
        /// <summary>分支1连出点</summary> 
        Case1OutDot,
        /// <summary>分支1连出点</summary>
        Case2OutDot,
        /// <summary>分支3连出点</summary>
        Case3OutDot,
        /// <summary>无</summary>
        NULL,
    }

    /// <summary>数据类型</summary>  
    public enum DataType
    {
        NULL,
        uint8_t,
        INT8,
        uint16_t,
        INT16,
        uint32_t,
        INT32,
        PUINT8,
        PINT8,
        PUINT16,
        PINT16,
        PUINT32,
        PINT32,
    }

    /// <summary>当前连接的控件的类型</summary>  
    public enum LineLinkIconType
    {
        /// <summary>通用控件</summary> 
        GeneralIcon,
        /// <summary>条件判断if控件</summary>
        CdnjudgeIcon,
        /// <summary>条件判断end控件</summary>
        CdnjudgeEndIcon,
        /// <summary>循环控件</summary>
        LoopIcon,
        /// <summary>Switch控件</summary>
        SwitchIcon,
        /// <summary>SwitchEnd控件</summary>
        SwitchEndIcon,
        /// <summary>无</summary>
        NULL,
    }
    #endregion

}
